package com.uzai.common.enums;

/**
 * 腾讯对象存储RegionKEY
 */
public enum TencentCosRegionEnum {

    /**
     * 北京
     */
    BEIJING("ap-beijing","北京", "<BucketName>.cos.ap-beijing.myqcloud.com"),

    /**
     * 上海
     */
    SHANGHAI("ap-shanghai","上海", "<BucketName>.cos.ap-shanghai.myqcloud.com"),

    /**
     * 广州
     */
    GUANGZHOU("ap-guangzhou","广州", "<BucketName>.cos.ap-guangzhou.myqcloud.com"),

    /**
     * 成都
     */
    CHENGDU("ap-chengdu","成都", "<BucketName>.cos.ap-chengdu.myqcloud.com"),

    /**
     * 重庆
     */
    CHONGQING("ap-chongqing","重庆", "<BucketName>.cos.ap-chongqing.myqcloud.com"),

    /**
     * 南京
     */
    NANJING("ap-nanjing","南京", "<BucketName>.cos.ap-nanjing.myqcloud.com"),

    /**
     * 香港
     */
    HONGKONG("ap-hongkong","香港", "<BucketName>.cos.ap-hongkong.myqcloud.com"),



    ;

    private String value;
    private String desc;
    private String domain;
    TencentCosRegionEnum(String value, String desc, String domain) {
        this.value = value;
        this.desc = desc;
        this.domain = domain;
    }
    public String getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public String getDomain() {
        return domain;
    }

    public static TencentCosRegionEnum getValue(String value) {
        if (value == null) {
            return null;
        }
        for (TencentCosRegionEnum type: TencentCosRegionEnum.values()) {
            if (type.getValue().equals(value) ) {
                return type;
            }
        }
        return null;
    }
    public static String getDesc(String value) {
        if(getValue(value) == null){
            return null;
        }
        return getValue(value).getDesc();
    }

}
